<?php
/**
 * Created by PhpStorm.
 * User: user
 * Date: 2016/3/23
 * Time: 14:07
 */

use front\assets\AppAsset;
use yii\helpers\Url;

$base = AppAsset::register($this);
$baseUrl = $base->baseUrl;

$css = <<<Css
    .u-bgc1{background-color: #ebf0f2;}
    .m-note1{background-color: #6d8b9a;color: #fff;text-align: center;padding: .425rem;font-size: .875rem;}
    .m-logi-list{}
    .m-logi-list dl{padding: 1rem 0;background: url({$baseUrl}/static/img/ico09.png) no-repeat 23% 65%;background-size:20px;font-size: .875rem;}
    .m-logi-list dl dt{float: left;width: 23%;text-align: center;padding:.25rem 5% 0 1%;color: #8dacbc;}
    .m-logi-list dl dd{float: left;width: 62%;background-color: #fff;border-radius:.35rem;padding:.8rem 2%;color: #3f5562;line-height:1.25rem;}
    .m-logi-list dl:nth-last-of-type(1){background-image: url({$baseUrl}/static/img/ico09l.png);}
Css;

$this->registerCss($css);

$this->title = '查看物流';
?>


<body class="u-bg1">

<div class="m-msg3">

    <h4 class="note">物流通知</h4>

    <?php if (!empty($waitPay)) {?>
        <h6><?= date('Y.m.d H:i', $waitPay[0]['order_time'])?></h6>
        <dl class="J_link" data-url="<?= Url::to(['order/index', 'status' => 1])?>">
            <dt>订单未支付</dt>
            <dd>您有 <?= sizeof($waitPay)?> 笔未支付订单即将失效，再不搞定就成别人的了，快去看看吧。</dd>
        </dl>
    <?php }?>

    <?php if (!empty($waitGet)) {?>
        <h6><?= date('Y.m.d H:i', $waitGet[0]['order_time'])?></h6>
        <dl class="J_link" data-url="<?= Url::to(['order/index', 'status' => 2])?>">
            <dt>商品派送中</dt>
            <dd> <?= $waitGetTitle?></dd>
        </dl>
    <?php }?>

    <?php if (!empty($waitComment)) {?>
        <h6><?= date('Y.m.d H:i', $waitComment[0]['order_time'])?></h6>
        <dl class="J_link" data-url="<?= Url::to(['order/index', 'status' => 3])?>">
            <dt>待评价订单</dt>
            <dd>您的评价很重要哦，快来评价一下吧！</dd>
        </dl>
    <?php }?>
</div>

<script>
    $(function(){

        // 链接跳转
        $('.J_link').on('tap', function(){

            window.location.href = $(this).attr('data-url');
        });

    });
</script>
</body>